export const drawer_config = () => {
    const config = {
        show: false,
        title: "字典值管理",
        direction: "rtl",
        size: "30%",
        labelWidth: "90px",
        messageBox: {
            status: true,
            title: "提示",
            message: "是否保存当前数据？",
            confirmButtonText: '保存',
            cancelButtonText: '放弃',
            type: 'warning', // success
            confirmEventName: "save",
            cancelEventName: null
        },
        ifSave: true,
        form: [
            {key: "dictCode",type: "hidden"},
            {key: "dictType",type: "hidden"},
            {key: "dictLabel", type: "text", label: "字典值名称"},
            {key: "dictValue", type: "text", label: "字典值"},
            {key: "dictSort", type: "number", label: "排序", min: 0, max: 999},
            {key: "cssClass", type: "text", label: "自定义样式"},
            {key: "listClass", type: "radio", label: "系统样式", source: "dict",dict: "sys_list_class"},
            {
                key: "status",
                type: "radio",
                label: "显示状态",
                source: "dict", //source: dict字典查询/select 数据来源方向
                dict: "sys_normal_disable"
            },
            {key: "remark", type: "textarea", label: "备注", alert: ""},
        ],
        //https://github.com/yiminghe/async-validator
        rules: {
            dictName: [
                {required: true, message: '请输入字典名称', trigger: 'blur'},
                {min: 2, max: 9, message: '长度需要2-9个汉字', trigger: 'blur'},
            ],
            dictType: [
                {required: true, message: '请输入角色类型', trigger: 'blur'},
                {min: 2, max: 50, message: '长度需要2-50个英文字母', trigger: 'blur'},
            ]
        }
    }
    return config
}